<?php
	require_once('inc_admin.php');	
	connect();
	$id = $_GET['id'];
	$sql="select * from flower where sqh_id={$id}";
	$result=mysql_query($sql);
	$row=mysql_fetch_assoc($result);
	$filename=UserPhotoPath.$row["sqh_pic"];
	$sql = "delete from flower where sqh_id={$id}";
	$result = mysql_query($sql) or die('删除失败！'.mysql_error());
	if(!mysql_error()){
		if($filename!=UserPhotoPath && file_exists($filename))
			unlink($filename);
		redirect('flowerlist.php', '删除成功！');
	}	
?>
